// 设计用户的表模型
const mongoose = require('mongoose')
const Schema = mongoose.Schema

// 设计用户模型
const UserSchema = new Schema({
  topicNum: {
    type: String,
    require: true
  },
  topicType: {
    type: String,
    require: true
  },
  stem: {
    type: String,
    require: true
  },
  answer: {
    type: String,
    require: true
  },
  analysis: {
    type: String
  },
  A: {
    type: String
  },
  B: {
    type: String
  },
  C: {
    type: String
  },
  D: {
    type: String
  },
  subject: {
    type: String
  },
})

// 通过 mongoose.model 往数据库里面映射出一张User表
module.exports = mongoose.model('queBank', UserSchema)
